import 'package:get/get.dart';
import 'package:xm_app/model/VodDetails.dart';
import 'package:xm_app/page/vod/VodDetailBind.dart';

abstract class Routes {
  static const HOME = "/home";
  static const MAIN = "/main";
  static const LOGIN = "/login";
  static const SPLASH = "/splash";
  static const WHITEBOARD = "/whiteboard";
  static const VOD_DETAIL = "/vodDetail";
  static const PLAY = "/play";
  static const SEARCH = "/search";
}

toVodDetailPage({int id}) {
  Get.toNamed(Routes.VOD_DETAIL + "/$id");
}

toPlay({Vod vod, int index, int fromIndex}) {
  Get.toNamed(Routes.PLAY, arguments: <String, dynamic>{"vod": vod, "index": index, "fromIndex": fromIndex});
}

toSearch() {
  Get.toNamed(Routes.SEARCH);
}
